//
//  HelpTableViewCell.m
//  51易借
//
//  Created by 张睿 on 2017/9/3.
//  Copyright © 2017年 张睿. All rights reserved.
//

#import "HelpTableViewCell.h"

@interface HelpTableViewCell ()

@property (nonatomic, weak)UILabel * timeLabel;
@property (nonatomic, weak)UIImageView * rightImageView;
@property (nonatomic, weak)UIView * lineView;

@end

@implementation HelpTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    if ([super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setupUI];
    }
    
    return self;
}


- (void)setupUI{
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    UILabel * titleLabel = [UILabel new];
    
    titleLabel.text = @"1.注册登录";
    titleLabel.textColor = ColorWithRGB(0x303c41);
    //    titleLabel.font = [UIFont systemFontOfSize:12 * SCREENH6];
    titleLabel.font = [UIFont fontWithName:TYPE_FACE size:15 * SCREENH6];
    
    self.titleLabel = titleLabel;
    
    [self.contentView addSubview:self.titleLabel];
    
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.contentView);
        make.leading.mas_equalTo(self.contentView).offset(20 * SCREENH6);
    }];
    
    
    UIImageView * rightImageView = [UIImageView new];
    
    rightImageView.image = [UIImage imageNamed:@"倒三角-箭头"];
    
    self.rightImageView = rightImageView;
    
    [self.contentView addSubview:self.rightImageView];
    
    [self.rightImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.trailing.mas_equalTo(self.contentView).offset(-18 * SCREENH6);
        make.centerY.mas_equalTo(self.contentView);
        make.width.mas_equalTo(7 * SCREENH6);
        make.height.mas_equalTo(15 * SCREENH6);
    }];
    
    UIView * lineView = [UIView new];
    
    lineView.backgroundColor = ColorWithRGB(0xdbdbdb);
    
    self.lineView = lineView;
    
    [self.contentView addSubview:self.lineView];
    
    [self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.mas_equalTo(self.contentView);
        make.height.mas_equalTo(1 * SCREENH6);
        make.leading.mas_equalTo(self.contentView).offset(5 * SCREENH6);
        make.trailing.mas_equalTo(self.contentView).offset(-5 * SCREENH6);
    }];
}



- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
